import { user } from '@src/db/src/models'

export default class Users {
  // 获取指定数据字段
  static getUserInfo(UID: string, attributes?: string[]) {
    return user.findOneValue({ attributes, where: { uid: UID } })
  }

  // 更新用户数据
  static updateInfo(UID: string, options) {
    return user.update(
      { ...options },
      {
        where: { uid: UID }
      }
    )
  }
}
